import { Request as request } from '@/utils/request'

/**
 * 查看全部权限列表
 * @param data
 * @returns {*}
 */
export const getTotalSysPermissions = (data = {}) => {
  return request({
    url: '/sys-permission/tree-list',
    method: 'post',
    data
  })
}

/**
 * 查看权限列表
 * @param roleId 角色
 * @returns {*}
 */
export const getSysPermissions = (roleId: string) => {
  return request({
    url: '/sys-permission/list',
    method: 'post',
    data: { roleId }
  })
}
